﻿using Huirui.Cavan.Domain.Seedwork;
using System;
using System.Collections;

namespace Huirui.Cavan.Domain.MainBoundedContext.SalesModule
{
	#region OtherReceivablesDetail

	/// <summary>
	/// OtherReceivablesDetail object for NHibernate mapped table 'OtherReceivablesDetail'.
	/// </summary>
    [Serializable]
	public class ReceivablesDetail : Persistent<long>
	{
		#region Member Variables
		
		protected string _accountCode;
		protected decimal _amount;
		protected Receivables _otherReceivables;

		#endregion

		#region Constructors

		public ReceivablesDetail() { }

		public ReceivablesDetail( string accountCode, decimal amount, DateTime createDate, DateTime modifyDate, int editUser, byte[] version, Receivables otherReceivables )
		{
			this._accountCode = accountCode;
			this._amount = amount;
			this._createDate = createDate;
			this._modifyDate = modifyDate;
			this._editUser = editUser;
			this._version = version;
			this._otherReceivables = otherReceivables;
		}

		#endregion

		#region Public Properties


		public virtual string AccountCode
		{
			get { return _accountCode; }
			set
			{
				if ( value != null && value.Length > 20)
					throw new ArgumentOutOfRangeException("Invalid value for AccountCode", value, value.ToString());
				_accountCode = value;
			}
		}

		public virtual decimal Amount
		{
			get { return _amount; }
			set { _amount = value; }
		}

		public virtual Receivables OtherReceivables
		{
			get { return _otherReceivables; }
			set { _otherReceivables = value; }
		}

		

		#endregion
	}
	#endregion
}